# -*- coding =utf-8 -*-
# @Time : 2022/9/13 11:35
# @Author :1814-09胡海燕
# @File : 3-3.py
# @Software : PyCharm
# 假设有9个球，分别是1~9的序号，把它们随机放到红黄蓝三个袋子中
# 请打印一次结果。tips:daizi=[ [ ],[ ],[ ] ]
import random
daizi = [[], [], []]
balls = ['1', '2', '3', '4', '5', '6', '7', '8', '9']
ball = random.choice(balls)
balls.remove(ball)
i = random.randint(1, 9)  # 随机生成[a-b]区间的整数
daizi[i].append(i)
print("红袋里为：%d" % i)
j = random.randint(1, 9)
daizi[j].append(j)
print("黄袋里为：%d" % j)
m = random.randint(1, 9)
daizi[m].append(m)
print("蓝袋里为：%d" % m)
